package com.qbw.core.base;

import android.content.Context;
import androidx.databinding.ViewDataBinding;
import android.view.Gravity;
import android.view.Window;

import com.qbw.app.R;


/**
 * Created by qinbaowei on 2017/1/16.
 * 宽充满屏幕，高度自适应，底部
 */

public abstract class BaseBottomDialog<B extends ViewDataBinding> extends BaseDialog<B> {

    public BaseBottomDialog(Context context) {
        super(context);
    }

    public BaseBottomDialog(Context context, int themeResId) {
        super(context, themeResId);
    }

    @Override
    protected void onSetWindowFlag() {
        super.onSetWindowFlag();
        Window window = getWindow();
        window.setGravity(Gravity.BOTTOM);

    }

    @Override
    protected void onInit() {
    }

    @Override
    protected int getWindowAnimations() {
        return R.style.DialogAnimationBottom;
    }

}
